﻿using ApplicationBoilerplate.DependencyInjection;
using Microsoft.AspNet.Identity;
using System;
using System.Collections.Generic;

namespace MVCForum.Web.Identity.EF {

	public class IdentityBuilder : IDependencyBuilder {

		public void Configure(IDependencyContainer container) {
			container.RegisterGeneric(typeof(UserManager<IUser>), typeof(MVCForumUserManager));
			container.RegisterGeneric(typeof(IRoleStore<IRole>), typeof(RoleStore));
			container.RegisterGeneric(typeof(IUserStore<IUser>), typeof(UserStore));
			container.RegisterGeneric(typeof(IUserPasswordStore<IUser>), typeof(UserStore));
			container.RegisterGeneric(typeof(IUserRoleStore<IUser>), typeof(UserStore));
			container.RegisterGeneric(typeof(IUserClaimStore<IUser>), typeof(UserStore));
			container.RegisterGeneric(typeof(IUserLoginStore<IUser>), typeof(UserStore));
			container.RegisterGeneric(typeof(IUserSecurityStampStore<IUser>), typeof(UserStore));

			// TODO: ????
		}

		public void ValidateRequirements(IList<ApplicationRequirement> feedback) {
		}
	}
}